<?php
namespace Deployer;

require 'recipe/common.php';

$project = "";
$repo = "";
$ip = "";
$user = "";
$keyfile = "";

set('application', $project);
set('repository', $repo);
set('git_tty', true);

set('shared_files', ['.env.config.production']);
set('shared_dirs', []);

host($ip)
    ->set('deploy_path', $path)
    ->user($user)
    ->identityFile($keyfile);

// Tasks

desc('Deploy your project');
task('deploy', [
    'deploy:info',
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:writable',
    'deploy:clear_paths',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success',
]);


// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');